package com.ytf.test.eighth;


/**
 * @author: YTF
 * @date: 2025/1/3 14:55
 * @version: 1.0
 * @description:
 */
public class Music3 {
    private static void tune(Instrument instrument) {
        instrument.play(Note.MIDDLE_C);
    }
    private static void tuneAll(Instrument[] instrument) {
        for (int i = 0; i < instrument.length; i++) {
         tune(instrument[i]);
        }
    }

    public static void main(String[] args) {
        Instrument[] instruments = {new Wind(),new Percussion(),new Stringed(),new Brass()};
        tuneAll(instruments);
    }
}
